package com.eugene.ui.perspective;

import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.IPlaceholderFolderLayout;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.ShowViewHandler;
import org.eclipse.ui.internal.dialogs.AboutDialog;

public class BasePerspective implements IPerspectiveFactory {
	private IPageLayout layout;

	public static final String ID = "com.eugene.ui.perspective.Base";
	
	public void createInitialLayout(IPageLayout layout) {
		this.layout = layout; 

		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(true);
        layout.setFixed( false );
        
        IFolderLayout leftFolder=layout.createFolder( ID + ".leftFolder", IPageLayout.LEFT, 0.25f, editorArea );
        IFolderLayout rightFolder = layout.createFolder( ID +".rightFolder", IPageLayout.RIGHT, 0.75f, editorArea );
        IFolderLayout bottomFolder = layout.createFolder(ID +".bottomFolder", IPageLayout.BOTTOM, 0.5f, editorArea );
        
//		leftFolder.addPlaceholder("*.MarketVariableView*:*");
//		leftFolder.addView("com.eugene.ui.views.MarketVariable");
//		rightFolder.addPlaceholder("*.ScenarioView*:*");
//		rightFolder.addView("com.eugene.ui.views.Scenario");
		
//		bottomFolder.addPlaceholder("*Property*:*");
//		bottomFolder.addView("com.eugene.ui.views.MarketVariablePropertyView");
//		bottomFolder.addView("com.eugene.ui.views.TestView");
        
        
	}
	 public IPageLayout getLayout() {
	        return layout;
	 }

}
